<div class="content-below-toolbar">
	
	<div class="inner-content">
		
		<div class="breadcrumb">
			<a href="../../">Products</a>
			{if $product.parent}
				<a href="../{$product.parent.code}/">{$product.parent.code} - {$product.parent.title|escape:"html":"UTF-8"}</a>
				{$product.code}
			{else}
				{$product.code}
				{if $product.title}
				 	- <span id="breadcrumb_title">{$product.title|escape:"html":"UTF-8"}</span>
				{else}
					Add product
				{/if}
			{/if}
		</div>
		
		<input type="hidden" name="id" value="{$product.id}" id="id" />
		
		<p>
			<label for="code">Product code</label>
			<input type="text" name="product[code]" value="{$product.code|escape:"html":"UTF-8"}" id="code" {if $product.id}disabled="disabled"{/if} />
		</p>
		
		
		{if !$product.parent}
		<p>
			<label for="title">Title</label>
			<input type="text" name="product[title]" value="{$product.title|escape:"html":"UTF-8"}" id="title" />
		</p>
		<script type="text/javascript" charset="utf-8">
			{literal}
			$(function() {
				$('#title').keyup(function() {
					$('#breadcrumb_title').text($('#title').val());
				});
			});
			{/literal}
		</script>
		
		<p>
			<label for="path">Path</label>
			<input type="text" name="product[path]" value="{$product.path|escape:"html":"UTF-8"}" id="path" />
		</p>
		
		<p>
			<label for="short_description">Short description</label>
			<input type="text" name="product[short_description]" value="{$product.short_description|escape:"html":"UTF-8"}" id="short_description" />
		</p>
		
		<p>
			<label for="description">Description</label>
			<textarea name="product[description]" id="description">{$product.description|escape:"html":"UTF-8"}</textarea>
		</p>
		
		<p>
			<label for="range_id">Range</label>
			<select name="product[range_id]" id="range_id">
				<option></option>
				{foreach from="`$ranges`" item="range"}
					<option value="{$range.id}" {if $range.id==$product.range_id}selected="selected"{/if}>{$range.title}</option>
				{/foreach}
			</select>
		</p>
		
		{else}
			
			{foreach from=$attributes item=attribute}
				<p>
					<label for="attribute_{$attribute.attribute_id}">{$attribute.title}</label>
					<input type="text" name="attribute[{$attribute.attribute_id}]" value="{$product.attributes[$attribute.attribute_id].value}" id="attribute_{$attribute.attribute_id}" />
				</p>
			{/foreach}
			
		{/if}
		
	</div>
	
</div>
